<?php
if (!defined('ROOT_PATH')) die('No direct access.');

function view_register($param,$facebook){
	view_header_top();
	//----------------------------------------------------------------
	$title = "Realita - Registrasi";
	$content = "Realita - Registrasi";
	$url = HOME_URL."login";
	$image = IMAGE_URL."300x240.gif";	//profpic orangnya / tokonya
	$desc = "Mendaftar sebelum berbelanja";
	$auth = "RealiTA";
	$qwords = "profil, marketplace, umkm".$user['nama'];
	//----------------------
	echo "<title>$title</title>";
	//<!--META DATA Open Graph-->
	echo "<meta property=\"og:title\" content=\"$title\"/>";
	echo "<meta property=\"og:type\" content=\"$content\"/>";
	echo "<meta property=\"og:url\" content=\"$url\"/>";
	echo "<meta property=\"og:image\" content=\"$image\"/>";
	echo "<meta property=\"og:site_name\" content=\"RealiTA UMKM\"/>";
	echo "<meta property=\"og:description\" content=\"$desc\" />";
	//<!--META DATA FB-->
	echo "<meta property=\"fb:app_id\" content=\"147346958657510\" />";
	//<!--META DATA-->
	echo "<meta name=\"author\" content=\"$auth\" />";
	echo "<meta name=\"keywords\" content=\"$qwords\" />";
	echo "<meta name=\"description\" content=\"$desc\" />";
	echo "<meta name=\"robots\" content=\"ALL\" />";
	echo "<meta charset=\"UTF-8\" />";
	//----------------------------------------------------------------
	view_header_bottom();
?>
	<div class="row">    
		<div class="large-12 columns">		  
		<h3>Registrasi</h3>
		<form method="post" action="<?php echo HOME_URL."login/reg?redir=".$_SERVER['HTTP_REFERER'] ?>">
			<input type="hidden" name="token" value="<?php echo $param['access_token'] ?>" />
			<input type="hidden" name="idfb" value="<?php echo $param['user_profile']['id'] ?>" />
			<input type="hidden" name="fb_username" value="<?php echo $param['user_profile']['username'] ?>" />
			<div class="large-12 columns">
				<div class="row">
					<div class="large-5 columns">
						<h5><?php echo $param['user_profile']['username'] ?></h5>
						<img src="<?php echo 'https://graph.facebook.com/'.$param['user_profile']['username'].'/picture?width=100&height=100' ?>" width="100px" height="100px" alt="profile pic" />
					  </div>
				</div>
				<div class="row">
					<div class="large-5 columns">
						<label>Nama</label>
						<input type="text" name="nama" placeholder="Nama..." value="<?php echo $param['user_profile']['name'] ?>" />
					  </div>
				</div>
				<div class="row">
					<div class="large-5 columns">
						<label>Email</label>
						<input type="text" name="email" placeholder="xxx@yyy.ccc..." value="<?php echo $param['user_profile']['email'] ?>" />
					  </div>
				</div>
				<div class="row">
					<div class="large-10 columns">
						<label>Deskripsi</label>
						<textarea name="desc" placeholder="deskripsi singkat profil..."><?php echo $param['user_profile']['bio'] ?></textarea>
					  </div>
				</div>
				<div class="row">
					<div class="large-3 columns">
						<label>Kota</label>
						<input type="text" name="kota" placeholder="nama kota" />
					  </div>
				</div>
				<div class="row">
					<div class="large-10 columns">
						<label>Alamat Lengkap</label>
						<textarea name="alamat" placeholder="alamat lengkap"></textarea>
					  </div>
				</div>
				<div class="row">
					<div class="large-3 columns">
						<label>Kontak</label>
						<input type="text" name="kontak" placeholder="08...." />
					  </div>
				</div>
				<div class="row">
					<div class="large-12 columns">
						<input class="small button" name="register" type="submit" value="Daftar !" />
					  </div>
				</div>
			</div>
		  </form>
		</div>
	</div>
    <!-- End Content -->
<?php
	view_footer();
}
?>

